package org.example.study1;

import java.io.File;

public class FilecanReadcanWrite {
    public static void main(String[] args) {
        // 定义文件对象
        File file = new File("d:/temp/document.txt");
        // 读
        System.out.println("是否可读：" + file.canRead());//true
        // 写
        System.out.println("是否可写：" + file.canWrite());//true
    }
}
